<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
  <script>
      var sum = 0;
      var i = 1;
      while(i <= 100){
          sum +=i;
          i ++;
      }
      console.log("sum = "+ sum);
  </script>
</body>
</html>